Loading TOC...

MarkLogic 10 Product Documentation
GET /manage/v2/databases/{id|name}/rebalancer

Summary

This resource address returns the current rebalancer configuration.

URL Parameters
format The format of the returned data. Can be either html, json, or xml (default). This value overrides the Accept header.
Request Headers
Accept The expected MIME type of the response. If the format parameter is present, it takes precedence over the Accept header. Supported values: application/xml, application/json.
Response Headers
Content-type The MIME type of the data in the response body. Depending upon the value of the format parameter or Accept header, one of application/xml, application/json, or text/html.

Response

Upon success, MarkLogic server returns status code 200 (OK) and the response body contains the requested in information as XML, JSON, or HTML, depending upon the format parameter or Accept header.

Required Privileges

This operation requires the manage-user role, or the following privilege:

http://marklogic.com/xdmp/privileges/manage

Usage Notes

The structure of the output returned from this REST API is as follows:

rebalancer-enable

Enable automatic rebalancing after configuration changes.

rebalancer-throttle

Larger numbers mean work harder at rebalancing.

Example


$ curl --anyauth --user user:password -X GET -i -H "Accept: application/xml" \
    http://localhost:8002/manage/v2/databases/example-db/rebalancer

HTTP/1.1 200 OK
Content-type: application/xml
Cache-Control: no-cache
Expires: -1
Server: MarkLogic
Content-Length: 310
Connection: Keep-Alive
Keep-Alive: timeout=5

<database-rebalancer-properties 
    xsi:schemaLocation="http://marklogic.com/manage manage.xsd" 
    xmlns="http://marklogic.com/manage" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <rebalancer-enable>true</rebalancer-enable>
  <rebalancer-throttle>5</rebalancer-throttle>
</database-rebalancer-properties>
  

Example


$ curl --anyauth --user user:password -X GET -i -H "Accept: application/json" \
    http://localhost:8002/manage/v2/databases/example-db/rebalancer

HTTP/1.1 200 OK
Content-type: application/json
Cache-Control: no-cache
Expires: -1
Server: MarkLogic
Content-Length: 51
Connection: Keep-Alive
Keep-Alive: timeout=5

{ 
  "rebalancer-enable":true, 
  "rebalancer-throttle":5
}
  

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.